The present invention relates generally to computer systems, and more particularly to queues used in memory of a computer system.
Computer systems have continually evolving technology leading to increased performance and complexity in the systems. For example, systems with multiple processors and/or processors with multiple cores will lead to concurrent execution of a plurality of threads. Data structures, such as a queues, stacks and double ended queues (“deques”) may be used to implement applications. A concurrent data structure, such as a concurrent queue, may be used concurrently by multiple users (e.g., threads). Concurrent operations on the data structure may be synchronized to ensure that the data in the structure is not corrupted by the operations. In some cases, an element in an array-based queue is a data object or a pointer to the data object that may be accessed by operations. For example, an application may have a plurality of threads, where a first thread stores an object in an element of the queue that is later loaded by a second thread from the queue for use in the application.